package com.qyhl.cloud.webtv.module_integral.wallet.exchangegold;


import com.qyhl.webtv.commonlib.entity.intergral.IntegralUserInfoBean;

public class ExchangeGoldPresenter implements ExchangeGoldContract.ExchangeGoldPresenter {
    private ExchangeGoldContract.ExchangeGoldView view;
    private ExchangeGoldContract.ExchangeGoldModel model;

    public ExchangeGoldPresenter(ExchangeGoldContract.ExchangeGoldView view) {
        this.view = view;
        model=new ExchangeGoldModel(this);
    }

    @Override
    public void onDestroy() {
        view = null;
        model.onDestroy();
    }

    @Override
    public void getIntegralData() {
        model.getIntegralData();
    }
    @Override
    public void integralError(String msg) {
        view.integralError(msg);
    }

    @Override
    public void integralSuccess(IntegralUserInfoBean data) {
        view.integralSuccess(data);
    }

    @Override
    public void exchange(String text) {
        model.exchange(text);
    }

    @Override
    public void exchangeError(String message) {
        view.exchangeError(message);
    }

    @Override
    public void exchangeSuccess() {
        view.exchangeSuccess();
    }

}
